#include <iostream>
#include "flist.h"

int main()
{
   FList fl;

   fl.add(new Rectangle(0, 0, 1, 1));
   fl.add(new Circle(0, 0, 1));
   std::cout << fl << std:: endl;
   fl.deltop();
   std::cout << fl << std:: endl;
   fl.clear();
   std::cout << fl << std:: endl;

   FListIterator i = fl;
   i.insert(new Rectangle(1, 1, 10, 10));
   std::cout << fl << std::endl;
   i.insert(new Circle(1, 0, 1));
   i.insert(new Circle(2, 0, 3));
   ++i; ++i;
   i.insert(new Circle(3, 5, 10));
   std::cout << fl << std::endl;
   i = fl;
   i.remove();
   std::cout << "+++++" << std::endl;
   for(i=fl; i != NULL; ++i)
   {
     std::cout << *i << std::endl;
   }
   std::cout << std::endl;
   return 0;
}
